package avicit.bdp.dgs.metadata.dto;

import avicit.bdp.common.base.BaseDTO;
import avicit.platform6.core.annotation.log.FieldRemark;
import avicit.platform6.core.annotation.log.LogField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.persistence.Column;
import javax.persistence.Table;

import org.apache.commons.lang3.StringUtils;

/**
 * 元数据基线版本明细
 *
 * @author mayi
 */
@ApiModel(value = "MetadataBaseVersionDetailDTO", description = "元数据基线版本明细")
@Table(name = "bdp_dgs_metadata_base_version_detail")
public class MetadataBaseVersionDetailDTO extends BaseDTO {
  private static final long serialVersionUID = 1L;

  /** 主键ID */
  @LogField
  @ApiModelProperty(value = "主键")
  @FieldRemark(column = "id", field = "id", name = "主键")
  @Column(name = "id")
  @avicit.platform6.core.annotation.log.Id
  @javax.persistence.Id
  private String id;

  /** 元数据基线版本ID */
  @LogField
  @ApiModelProperty(value = "元数据基线版本ID", name = "metadataBaseVersionId")
  @FieldRemark(
      column = "metadata_base_version_id",
      field = "metadataBaseVersionId",
      name = "元数据基线版本ID")
  private String metadataBaseVersionId;

  /** 数据源ID */
  @LogField
  @ApiModelProperty(value = "数据源ID", name = "datasourceId")
  @FieldRemark(column = "datasource_id", field = "datasourceId", name = "数据源ID")
  private String datasourceId;

  /** 元数据ID */
  @LogField
  @ApiModelProperty(value = "元数据ID", name = "metadataId")
  @FieldRemark(column = "metadata_id", field = "metadataId", name = "元数据ID")
  private String metadataId;

  /** 元数据版本 */
  @LogField
  @ApiModelProperty(value = "元数据版本", name = "metadataVersion")
  @FieldRemark(column = "metadata_version", field = "metadataVersion", name = "元数据版本")
  private String metadataVersion;

  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

  public String getMetadataBaseVersionId() {
    return metadataBaseVersionId;
  }

  public void setMetadataBaseVersionId(String metadataBaseVersionId) {
    this.metadataBaseVersionId = metadataBaseVersionId;
  }

  public String getDatasourceId() {
    return datasourceId;
  }

  public void setDatasourceId(String datasourceId) {
    this.datasourceId = datasourceId;
  }

  public String getMetadataId() {
    return metadataId;
  }

  public void setMetadataId(String metadataId) {
    this.metadataId = metadataId;
  }

  public String getMetadataVersion() {
    return metadataVersion;
  }

  public void setMetadataVersion(String metadataVersion) {
    this.metadataVersion = metadataVersion;
  }

  public String getLogFormName() {
    if (StringUtils.isEmpty(super.logFormName)) {
      return "元数据基线版本明细";
    } else {
      return super.logFormName;
    }
  }

  public String getLogTitle() {
    if (StringUtils.isEmpty(super.logTitle)) {
      return "元数据基线版本明细";
    } else {
      return super.logTitle;
    }
  }
}
